<?php

namespace app\common\lib;

class Str
{
    public static function getLoginToken($string){
        //生成token
        //生成一个不会重复的字符串
        $str = md5(uniqid(md5(microtime(true)),true));
        $token = sha1($str.$string);//加密
        return $token;
    }
}